angular.module('app.baseinfo')

    .factory('logisticsService', ["$http", "config", function ($http, config) {

        var baseUrl = config.baseUrl;

        var ret = {};

        ret.addLogistics=function(logistics){
            var url=baseUrl+"/lcs";
            return $http.post(url,logistics);
        };

        ret.getLogistics=function(query){
            var url=baseUrl+"/lcs";
            return $http.get(url,{params:query});
        };

        ret.updateLogistics=function(logistics){
            var url=baseUrl+"/lcs/"+logistics.id;
            return $http.put(url,logistics);
        };

        ret.deleteLogistics=function(logistics){
            var url=baseUrl+"/lcs/"+logistics.id;
            return $http.delete(url);
        };

        return ret;
    }]);